package com.example.micro.consumer.config;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
public class AppConfig {

    @Bean
    @LoadBalanced //表示负载均衡
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
